package com.cskaoyan.controller.footController;

import com.cskaoyan.model.bo.footbo.FeedBackBo;
import com.cskaoyan.model.bo.footbo.FootDeleteBo;
import com.cskaoyan.model.vo.BaseRespVo;
import com.cskaoyan.model.vo.foodvo.FootPrintListVo;
import com.cskaoyan.service.FootService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class FootController {

    @Autowired
    FootService footService;

    @RequestMapping("/wx/footprint/list")
    public BaseRespVo footprintList(Integer page, Integer size ){
        FootPrintListVo footPrintListVo = footService.footprintList(page, size);
        return BaseRespVo.ok(footPrintListVo);
    }

    @RequestMapping("/wx/footprint/delete")
    public BaseRespVo footprintDelete(@RequestBody FootDeleteBo footDeleteBo){
        footService.footprintDelete(footDeleteBo);
        return BaseRespVo.ok();
    }

    @RequestMapping("/wx/feedback/submit")
    public BaseRespVo feedbackSubmit(@RequestBody FeedBackBo feedBackBo){
        footService.feedbackSubmit(feedBackBo);
        return BaseRespVo.ok();
    }
}
